<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/common.css?01_38"/>
		<link rel="stylesheet" type="text/css" href="../css/templet.css?01_38"/>
		<link rel="stylesheet" type="text/css" href="../fonts/font-awesome.min.css?01_38"/>
		<link rel="stylesheet" type="text/css" href="../mui/css/mui.css?01_38"/>
		
		<script src="../js/common.js?01_38" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div class="wrap_body table_management">
			
			<header class="pr bg-red9 fff f-20 pad-t-10 pad-b-10 pad-l-10 pad-r-10">
				<div class="">选中<span>11</span>个桌台</div>
				<div class="pa regulate" onClick="back()"><a class="fff f-15 pad-r-10">完成</a></div>
				<!--<div class="pa regulate"><a href="tableStatus.html" onClick="back()" class="fff f-15 pad-r-10">完成</a></div>-->
			</header>
			
			<div class="content pad-l-12 pad-r-12">
				<!--大厅-->
				<div class="lobby">
					<div class="cf pad-t-12 pad-b-12 f-15 a15900">
						<div class="fl">大厅</div>
						<div class="fr red9" onclick="checkAll(this)">全选</div>
					</div>
					
					<div class="state cf">
						<div class="item fl mag-b-10">
							<div class="pad-l-5 pad-t-5 pad-r-5 bg-e4d9cc a15900 f-16">
								<div class="top center pad-t-10 pad-b-10">
									<p>001桌</p>
									<div class="wrap bg-fff"><span class="bg mag-t-8"></span></div>
								</div>
								<div class="bottom cf pad-t-8 pad-b-5 f-13 pad-l-5">
									<span>0</span><span>/</span><span>4</span>
								</div>
							</div>
						</div>
						
						<div class="item fl mag-b-10">
							<div class="pad-l-5 pad-t-5 pad-r-5 bg-e4d9cc a15900 f-16">
								<div class="top center pad-t-10 pad-b-10">
									<p>002桌</p>
									<div class="wrap bg-fff"><span class="bg mag-t-8"></span></div>
								</div>
								<div class="bottom cf pad-t-8 pad-b-5 f-13 pad-l-5">
									<span>0</span><span>/</span><span>4</span>
								</div>
							</div>
						</div>
						
						
						<div class="item fl mag-b-10">
							<div class="pad-l-5 pad-t-5 pad-r-5 bg-e4d9cc a15900 f-16">
								<div class="top center pad-t-10 pad-b-10">
									<p>003桌</p>
									<div class="wrap bg-fff"><span class="bg mag-t-8"></span></div>
								</div>
								<div class="bottom cf pad-t-8 pad-b-5 f-13 pad-l-5">
									<span>0</span><span>/</span><span>4</span>
								</div>
							</div>
						</div>
						
						
						<div class="item fl mag-b-10">
							<div class="pad-l-5 pad-t-5 pad-r-5 bg-e4d9cc a15900 f-16">
								<div class="top center pad-t-10 pad-b-10">
									<p>004桌</p>
									<div class="wrap bg-fff"><span class="bg mag-t-8"></span></div>
								</div>
								<div class="bottom cf pad-t-8 pad-b-5 f-13 pad-l-5">
									<span>0</span><span>/</span><span>4</span>
								</div>
							</div>
						</div>
						
						
						<div class="item fl mag-b-10">
							<div class="pad-l-5 pad-t-5 pad-r-5 bg-e4d9cc a15900 f-16">
								<div class="top center pad-t-10 pad-b-10">
									<p>005桌</p>
									<div class="wrap bg-fff"><span class="bg mag-t-8"></span></div>
								</div>
								<div class="bottom cf pad-t-8 pad-b-5 f-13 pad-l-5">
									<span>0</span><span>/</span><span>4</span>
								</div>
							</div>
						</div>
						
						
						<div class="item fl mag-b-10">
							<div class="pad-l-5 pad-t-5 pad-r-5 bg-e4d9cc a15900 f-16">
								<div class="top center pad-t-10 pad-b-10">
									<p>006桌</p>
									<div class="wrap bg-fff"><span class="bg mag-t-8"></span></div>
								</div>
								<div class="bottom cf pad-t-8 pad-b-5 f-13 pad-l-5">
									<span>0</span><span>/</span><span>4</span>
								</div>
							</div>
						</div>
						
						
					</div>
					
				</div>
				
				<!--分区二-->
				<div class="subregion_02">
					<div class="cf pad-t-12 pad-b-12 f-15 a15900">
						<div class="fl">分区二</div>
						<div class="fr red9">全选</div>
					</div>
					
					<div class="state cf">
						
						<div class="item fl mag-b-10">
							<div class="pad-l-5 pad-t-5 pad-r-5 bg-e4d9cc a15900 f-16">
								<div class="top center pad-t-10 pad-b-10">
									<p>001桌</p>
									<div class="wrap bg-fff">
										<span class="bg mag-t-8 "></span>
									</div>
								</div>
								<div class="bottom cf pad-t-8 pad-b-5 f-13 pad-l-5">
									<span>0</span><span>/</span><span>4</span>
								</div>
							</div>
						</div>
						
						<div class="item fl mag-b-10">
							<div class="pad-l-5 pad-t-5 pad-r-5 bg-e4d9cc a15900 f-16">
								<div class="top center pad-t-10 pad-b-10">
									<p>002桌</p>
									<div class="wrap bg-fff"><span class="bg mag-t-8"></span></div>
								</div>
								<div class="bottom cf pad-t-8 pad-b-5 f-13 pad-l-5">
									<span>0</span><span>/</span><span>4</span>
								</div>
							</div>
						</div>
						
						<div class="item fl mag-b-10">
							<div class="pad-l-5 pad-t-5 pad-r-5 bg-e4d9cc a15900 f-16">
								<div class="top center pad-t-10 pad-b-10">
									<p>003桌</p>
									<div class="wrap bg-fff"><span class="bg mag-t-8"></span></div>
								</div>
								<div class="bottom cf pad-t-8 pad-b-5 f-13 pad-l-5">
									<span>0</span><span>/</span><span>4</span>
								</div>
							</div>
						</div>
						
						
						
						
						
						
					</div>
					
				</div>
			</div>
			
		</div>
	</body>
	
	
	
	<script type="text/javascript">
		console.log(9)
		//获取元素
		var bg = document.querySelectorAll(".bg");
		console.log(bg);
		function checkAll (el) {
			for (var i=0; i<bg.length; i++) {
				console.log(i);
//				el.innerText == "全选" ? bg[i].style.display = "inline-block" : bg[i].style.display = "none" ;
//				el.innerText == "全选" ? el.innerText = "取消全选" : el.innerText = "全选" ;
				if (el.innerHTML == "全选") {
					console.log(bg[i]);
					console.log(i);
					
					bg[i].style.display = "inline-block"
					el.innerText = "取消全选";
				}else {
					el.innerText = "全选" ;
					bg[i].style.display = "none" ;
				}
			}
		}
	</script>
</html>
